Skip to content

Introduce the @JavaStaticMethod and use it for calling static Java methods #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

DougGregor
Copy link
Member

The use of the @JavaMethod macro within an extension of JavaClass to
represent static Java methods on that class didn't quite work, because
JavaClass is itself an AnyJavaObject with its own methods. Introduce
a @JavaStaticMethod macro that will be used for this purpose, and
have it call through a separate API (dynamicJavaStaticMethodCall).

Thank you to @lokesh-tr for reporting this bug!

As a bonus, unbreak the macOS build

…thods

The use of the `@JavaMethod` macro within an extension of `JavaClass` to
represent static Java methods on that class didn't quite work, because
JavaClass is itself an AnyJavaObject with its own methods. Introduce
a `@JavaStaticMethod` macro that will be used for this purpose, and
have it call through a separate API (`dynamicJavaStaticMethodCall`).

Thank you to Lokesh for reporting this bug!
@DougGregor DougGregor merged commit ddef48a into swiftlang:main Oct 2, 2024
8 of 9 checks passed
@DougGregor DougGregor deleted the javakit-static-methods branch October 2, 2024 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant